package lastRites.enums;

import lastRites.ui.Item;
import lastRites.ui.ItemStack;

public enum BlockType {
	// @formatter:off
	AIR(true, false, 0, null, 0, false), 
	GRASS1(true, false, 0, null, 0, false), 
	TREE1(false, true, 1, null, 15, false), 
	TALLGRASS1(true, true, 1, null, 0, false), 
	TALLTREE1(false, true, 2, null, 25, false), 
	FANCYGRASS1(true, false, 0, null, 5, false), 
	WOODEN_WALL_01(false, false, 1, null, 0, true), 
	DIRT(false, true, 0, new ItemStack( Item.DIRT, 1 ), 8, true);	// @formatter:on

	private boolean		passable, farmable, positionAware;
	private int			verticalOverlap;
	private ItemStack	drops;
	private float		harvestHP;

	BlockType(boolean passable, boolean farmable, int verticalOverlap, ItemStack drops, float hhp, boolean positionAware) {
		this.passable = passable;
		this.farmable = farmable;
		this.verticalOverlap = verticalOverlap;
		this.drops = drops;
		this.harvestHP = hhp;
		this.positionAware = positionAware;
	}

	public boolean isPassable() {
		return this.passable;
	}

	public boolean isFarmable() {
		return this.farmable;
	}

	public int getVerticalOverlap() {
		return this.verticalOverlap;
	}

	public ItemStack getDrops() {
		if( this.drops == null ) { return null; }
		return this.drops.clone();
	}

	public float getHarvestHP() {
		return this.harvestHP;
	}

	public boolean isPositionAware() {
		return positionAware;
	}

	public void setPositionAware(boolean positionAware) {
		this.positionAware = positionAware;
	}
}
